<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title></title>
		<style type="text/css">
			.tab-list {
				list-style: none;
				padding: 0;
				margin: 0;
				display: flex;
			}

			.tab-list li {
				width: 120px;
				height: 40px;
				text-align: center;
				line-height: 40px;
				border: 1px solid #ccc;
				background: yellowgreen;
				box-sizing: border-box;
			}

			.tab-list li.active {
				background: red;
			}

			.content-item {
				padding: 0;
				margin: 0;
				width: 356px;
				height: 150px;
				border: 2px solid #ddd;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<ul class="tab-list">
				<li 
					@click="tabClick(index)"
					:class="{active:currenIndex === index}"
					v-for="(item,index) in tabList">
					{{item}}
				</li>
			</ul>
			<div 
				class="content-item"
				v-show="currenIndex === index"
				v-for="(item,index) in contentList">
				{{item}}
			</div>
		</div>


		<script src="js/v2.6.10/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/demo4.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
